package com.spstudio.iforward.front.producer;

import javax.ejb.EJB;
import javax.enterprise.inject.Produces;
import javax.naming.NamingException;

import com.spstudio.iforward.front.SPCoreDaemon;
import com.spstudio.iforward.front.interfaces.IStorySessionBeanRemote;
import com.spstudio.iforward.front.qualifier.StorySessionBeanRemoteQualifier;

public class StorySessionBeanRemoteProducer {
	
	@EJB
	SPCoreDaemon daemon;
	
	@Produces
	@StorySessionBeanRemoteQualifier
	IStorySessionBeanRemote produce(){
		IStorySessionBeanRemote bean = null;
 		try {
 			bean = (IStorySessionBeanRemote)daemon.lookup("java:global/iForward-ejb/StorySessionBean");
 		} catch (NamingException e) {
			e.printStackTrace();
		}
 		return bean;
	}
}
